package cn.ilikes.tools.nosql.test.jpa.pojos;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import cn.ilikes.tools.nosql.jpa.annotations.IndexColumn;

@Entity
@Table(name = "pe_module", schema = "ilikes")
public class Module {
	@Id
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "id", store = IndexColumn.Store.yes)
	private Integer uuid;

	@Column(name = "module_name")
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "moduleName", store = IndexColumn.Store.yes)
	private String moduleName;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "modules")
	private List<RoleModuleMaps> roleModuleMaps;

	public Integer getUuid() {
		return uuid;
	}

	public void setUuid(Integer uuid) {
		this.uuid = uuid;
	}

	public String getModuleName() {
		return moduleName;
	}

	public void setModuleName(String moduleName) {
		this.moduleName = moduleName;
	}

	public List<RoleModuleMaps> getRoleModuleMaps() {
		return roleModuleMaps;
	}

	public void setRoleModuleMaps(List<RoleModuleMaps> roleModuleMaps) {
		this.roleModuleMaps = roleModuleMaps;
	}

}
